package com.neusoft.neuiotms.dcam.workflow.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;

import com.neusoft.bizcore.web.jpa.model.AbstractAuditModel;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Entity
@Table(name = "neuiot_workorder_ruku_kj_asset")
@org.hibernate.annotations.Table(appliesTo = "neuiot_workorder_ruku_kj_asset", comment = "科技到货验收资产表")
public class RukuKJAsset extends AbstractAuditModel {

    private static final long serialVersionUID = 1L;

    @ManyToOne
    private RukuKJ ruku;

    /** 资产名称 */
    @NotBlank(message = "资产名不能为空")
    @Length(max = 255, message = "资产名不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String name;

    /** 原始资产编号 */
    @Length(max = 255, message = "原始资产编号不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String originalCode;

    /** 购置日期 */
    @Column(nullable = true)
    private Date purchaseDate;

    /** 供应商ID */
    @Column(nullable = true)
    private Long supplierId;

    /** 供应商名称 */
    @Length(max = 255, message = "供应商名称不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String supplierName;

    /** 规格型号 */
    @Length(max = 255, message = "规格型号不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String specifications;

    /** 序列号 */
    @Length(max = 255, message = "序列号不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String serialnumber;

    /** 机房 */
    @Length(max = 255, message = "机房不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String computerRoom;

    /** 机柜 */
    @Length(max = 255, message = "机柜不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String cabinet;

    /** 品牌 */
    @Length(max = 255, message = "品牌不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String brand;

    /** 维保开始时间 */
    @Column(nullable = true)
    private Date maintenanceStartTime;

    /** 维保结束时间 */
    @Column(nullable = true)
    private Date maintenanceEndTime;

    /** 位置 */
    @Length(max = 255, message = "位置不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String location;

    /** 位置名称 */
    @Length(max = 255, message = "位置名称不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String locationName;

    /** 大类型名称 */
    @Length(max = 255, message = "大类型名称不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String bigTypeName;

    /** 大类型编码 */
    @Length(max = 255, message = "大类型编码不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String bigTypeCode;

    /** 中类型名称 */
    @Length(max = 255, message = "中类型名称不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String middleTypeName;

    /** 中类型编码 */
    @Length(max = 255, message = "中类型编码名称不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String middleTypeCode;

    /** 小中类型名称 */
    @Length(max = 255, message = "小类型名称不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String smallTypeName;

    /** 小类型编码 */
    @Length(max = 255, message = "小类型编码名称不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String smallTypeCode;

    /** 合同号 */
    @Length(max = 255, message = "合同号不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String contractNo;

    /** 合同名称 */
    @Length(max = 255, message = "合同名称不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String contractName;

    /** 计量单位 */
    @Length(max = 255, message = "计量单位不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String measureUnit;

    /** 数量 */
    @Column(nullable = true)
    private int amount = 1;

    /** 金额 */
    @Column(length = 255, nullable = true)
    private Double money;

    /** 使用期限 */
    @Length(max = 255, message = "使用期限不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String usePeriod;

    /** 备注 */
    @Length(max = 255, message = "备注不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String note;

    /** 使用部门名称 */
    @Length(max = 255, message = "使用部门不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String managementOrgName;

    /** 使用部门编码 */
    @Length(max = 255, message = "使用部门编码不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String managementOrgCode;

    /** 使用人编码 */
    @Length(max = 255, message = "使用人编码不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String managementUserCode;

    /** 使用人名称 */
    @Length(max = 255, message = "使用人名称不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String managementUserName;

    /** 所属 */
    @Length(max = 255, message = "所属不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String belongs;

    /** 类别 */
    @Length(max = 1, message = "类别不能超过{max}位")
    @Column(length = 1, nullable = true)
    private String categories;

    /** 资产卡片（总行） */
    @Length(max = 255, message = "资产卡片不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String card;

    /** 资产状态 */
    @Length(max = 255, message = "资产状态不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String status;

    /** 用途 */
    @Length(max = 1023, message = "用途不能超过{max}位")
    @Column(length = 1023, nullable = true)
    private String purpose;

}
